package com.woniuxy.service.impl;

import com.woniuxy.dao.CarAmountMapper;
import com.woniuxy.pojo.Car;
import com.woniuxy.pojo.CarAmount;
import com.woniuxy.pojo.CarAmountTable;
import com.woniuxy.pojo.CarTotalAmount;
import com.woniuxy.service.CarAmountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CarAmountServiceImpl implements CarAmountService{
    @Autowired
    private CarAmountMapper carAmountMapper;
    @Override
    public List<CarAmount> selectById(Integer carId) {
        return carAmountMapper.selectById(carId,CarAmountTable.carAmountTables);
    }

    @Override
    public List<Car> selectAllCars() {
        return carAmountMapper.selectAllCars();
    }

    @Override
    public List<CarTotalAmount> selectAll() {
        return carAmountMapper.selectAll(CarAmountTable.carAmountTables);
    }
}
